# -*- coding: utf-8 -*- 

###########################################################################
## Python code generated with wxFormBuilder (version Feb  9 2012)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc

###########################################################################
## Class Epistasis_monitor
###########################################################################

class Epistasis_monitor ( wx.Panel ):
	
	def __init__( self, parent ):
		wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 800,600 ), style = wx.TAB_TRAVERSAL )
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer5 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_bpButton1 = wx.BitmapButton( self.m_panel1, wx.ID_ANY, wx.Bitmap( u"images/greygenetics_small.jpg", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, 0|wx.NO_BORDER )
		bSizer5.Add( self.m_bpButton1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
		
		self.monitor_title = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Epistasis analysis monitor", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.monitor_title.Wrap( -1 )
		self.monitor_title.SetFont( wx.Font( 13, 70, 90, 90, False, wx.EmptyString ) )
		
		bSizer5.Add( self.monitor_title, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
		
		
		bSizer2.Add( bSizer5, 0, 0, 5 )
		
		
		bSizer2.AddSpacer( ( 0, 0), 0, 0, 5 )
		
		self.job_list = wx.ListCtrl( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LC_HRULES|wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.SUNKEN_BORDER )
		bSizer2.Add( self.job_list, 1, wx.ALL|wx.EXPAND, 5 )
		
		bSizer3 = wx.BoxSizer( wx.HORIZONTAL )
		
		gSizer1 = wx.GridSizer( 0, 2, 0, 0 )
		
		self.m_staticText2 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Number of jobs :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		gSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 )
		
		self.num_jobs = wx.StaticText( self.m_panel1, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.num_jobs.Wrap( -1 )
		gSizer1.Add( self.num_jobs, 0, wx.ALL, 5 )
		
		self.m_staticText4 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Overall status :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )
		gSizer1.Add( self.m_staticText4, 0, wx.ALL, 5 )
		
		self.overall_status = wx.StaticText( self.m_panel1, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.overall_status.Wrap( -1 )
		gSizer1.Add( self.overall_status, 0, wx.ALL, 5 )
		
		
		bSizer3.Add( gSizer1, 0, 0, 5 )
		
		gSizer2 = wx.GridSizer( 0, 2, 0, 0 )
		
		self.m_staticText6 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Started :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		gSizer2.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.started_time = wx.StaticText( self.m_panel1, wx.ID_ANY, u"NA", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.started_time.Wrap( -1 )
		gSizer2.Add( self.started_time, 0, wx.ALL, 5 )
		
		self.m_staticText8 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Finished :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText8.Wrap( -1 )
		gSizer2.Add( self.m_staticText8, 0, wx.ALL, 5 )
		
		self.finished_time = wx.StaticText( self.m_panel1, wx.ID_ANY, u"NA", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.finished_time.Wrap( -1 )
		gSizer2.Add( self.finished_time, 0, wx.ALL, 5 )
		
		
		bSizer3.Add( gSizer2, 0, 0, 5 )
		
		
		bSizer2.Add( bSizer3, 0, wx.EXPAND, 5 )
		
		bSizer6 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.stop_btn = wx.Button( self.m_panel1, wx.ID_ANY, u"Stop", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer6.Add( self.stop_btn, 0, wx.ALL, 5 )
		
		self.close_btn = wx.Button( self.m_panel1, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.close_btn.SetDefault() 
		bSizer6.Add( self.close_btn, 0, wx.ALL, 5 )
		
		
		bSizer2.Add( bSizer6, 0, wx.ALIGN_RIGHT, 5 )
		
		
		self.m_panel1.SetSizer( bSizer2 )
		self.m_panel1.Layout()
		bSizer2.Fit( self.m_panel1 )
		bSizer1.Add( self.m_panel1, 1, wx.EXPAND |wx.ALL, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		self.rightclick_menu = wx.Menu()
		self.menu_files = wx.MenuItem( self.rightclick_menu, wx.ID_ANY, u"Go to files", wx.EmptyString, wx.ITEM_NORMAL )
		self.rightclick_menu.AppendItem( self.menu_files )
		self.menu_files.Enable( False )
		
		self.menu_open_summary = wx.MenuItem( self.rightclick_menu, wx.ID_ANY, u"Open summary", wx.EmptyString, wx.ITEM_NORMAL )
		self.rightclick_menu.AppendItem( self.menu_open_summary )
		self.menu_open_summary.Enable( False )
		
		self.menu_cancel_job = wx.MenuItem( self.rightclick_menu, wx.ID_ANY, u"Cancel job", wx.EmptyString, wx.ITEM_NORMAL )
		self.rightclick_menu.AppendItem( self.menu_cancel_job )
		self.menu_cancel_job.Enable( False )
		
		self.Bind( wx.EVT_RIGHT_DOWN, self.Epistasis_monitorOnContextMenu ) 
		
		
		# Connect Events
		self.job_list.Bind( wx.EVT_LIST_ITEM_ACTIVATED, self.OnDClick )
		self.job_list.Bind( wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClick )
		self.stop_btn.Bind( wx.EVT_BUTTON, self.OnStop )
		self.close_btn.Bind( wx.EVT_BUTTON, self.OnClose )
		self.Bind( wx.EVT_MENU, self.OnGotoFiles, id = self.menu_files.GetId() )
		self.Bind( wx.EVT_MENU, self.OnOpenSummary, id = self.menu_open_summary.GetId() )
		self.Bind( wx.EVT_MENU, self.OnCancelJob, id = self.menu_cancel_job.GetId() )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def OnDClick( self, event ):
		event.Skip()
	
	def OnRightClick( self, event ):
		event.Skip()
	
	def OnStop( self, event ):
		event.Skip()
	
	def OnClose( self, event ):
		event.Skip()
	
	def OnGotoFiles( self, event ):
		event.Skip()
	
	def OnOpenSummary( self, event ):
		event.Skip()
	
	def OnCancelJob( self, event ):
		event.Skip()
	
	def Epistasis_monitorOnContextMenu( self, event ):
		self.PopupMenu( self.rightclick_menu, event.GetPosition() )
		

###########################################################################
## Class startup_progress_box
###########################################################################

class startup_progress_box ( wx.Panel ):
	
	def __init__( self, parent ):
		wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 350,350 ), style = wx.RAISED_BORDER )
		
		bSizer6 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText11 = wx.StaticText( self, wx.ID_ANY, u"Starting analysis", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText11.Wrap( -1 )
		self.m_staticText11.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
		
		bSizer6.Add( self.m_staticText11, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
		
		self.m_staticline1 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer6.Add( self.m_staticline1, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer7 = wx.BoxSizer( wx.HORIZONTAL )
		
		
		bSizer7.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		self.m_bitmap2 = wx.StaticBitmap( self, wx.ID_ANY, wx.Bitmap( u"images/dnasmaller.jpg", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.Size( -1,180 ), 0 )
		bSizer7.Add( self.m_bitmap2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
		
		
		bSizer7.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
		
		
		bSizer6.Add( bSizer7, 1, wx.EXPAND, 5 )
		
		bSizer8 = wx.BoxSizer( wx.VERTICAL )
		
		self.startup_progress_bar = wx.Gauge( self, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.GA_HORIZONTAL )
		bSizer8.Add( self.startup_progress_bar, 0, wx.ALL|wx.EXPAND, 5 )
		
		self.startup_progress_text = wx.StaticText( self, wx.ID_ANY, u"Preparing analysis...", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.startup_progress_text.Wrap( 350 )
		bSizer8.Add( self.startup_progress_text, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
		
		
		bSizer6.Add( bSizer8, 0, wx.EXPAND, 5 )
		
		bSizer9 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticline2 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer9.Add( self.m_staticline2, 0, wx.EXPAND |wx.ALL, 5 )
		
		self.cancel_startup_btn = wx.Button( self, wx.ID_ANY, u"Cancel", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer9.Add( self.cancel_startup_btn, 0, wx.ALL|wx.ALIGN_RIGHT, 5 )
		
		
		bSizer6.Add( bSizer9, 0, wx.EXPAND, 5 )
		
		
		self.SetSizer( bSizer6 )
		self.Layout()
		
		# Connect Events
		self.cancel_startup_btn.Bind( wx.EVT_BUTTON, self.OnCancelStartup )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def OnCancelStartup( self, event ):
		event.Skip()
	

###########################################################################
## Class Epistasis_monitor_frame_old
###########################################################################

class Epistasis_monitor_frame_old ( wx.Frame ):
	
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Epistasis monitor", pos = wx.DefaultPosition, size = wx.Size( 800,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer5 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_bpButton1 = wx.BitmapButton( self.m_panel1, wx.ID_ANY, wx.Bitmap( u"images/greygenetics_small.jpg", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, 0|wx.NO_BORDER )
		bSizer5.Add( self.m_bpButton1, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
		
		self.monitor_title = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Epistasis analysis monitor", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.monitor_title.Wrap( -1 )
		self.monitor_title.SetFont( wx.Font( 13, 70, 90, 90, False, wx.EmptyString ) )
		
		bSizer5.Add( self.monitor_title, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
		
		
		bSizer2.Add( bSizer5, 0, 0, 5 )
		
		
		bSizer2.AddSpacer( ( 0, 0), 0, 0, 5 )
		
		self.job_list = wx.ListCtrl( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LC_HRULES|wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.SUNKEN_BORDER )
		bSizer2.Add( self.job_list, 1, wx.ALL|wx.EXPAND, 5 )
		
		bSizer3 = wx.BoxSizer( wx.HORIZONTAL )
		
		gSizer1 = wx.GridSizer( 0, 2, 0, 0 )
		
		self.m_staticText2 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Number of jobs :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		gSizer1.Add( self.m_staticText2, 0, wx.ALL, 5 )
		
		self.num_jobs = wx.StaticText( self.m_panel1, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.num_jobs.Wrap( -1 )
		gSizer1.Add( self.num_jobs, 0, wx.ALL, 5 )
		
		self.m_staticText4 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Overall status :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )
		gSizer1.Add( self.m_staticText4, 0, wx.ALL, 5 )
		
		self.overall_status = wx.StaticText( self.m_panel1, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.overall_status.Wrap( -1 )
		gSizer1.Add( self.overall_status, 0, wx.ALL, 5 )
		
		
		bSizer3.Add( gSizer1, 0, 0, 5 )
		
		gSizer2 = wx.GridSizer( 0, 2, 0, 0 )
		
		self.m_staticText6 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Started :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		gSizer2.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.started_time = wx.StaticText( self.m_panel1, wx.ID_ANY, u"NA", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.started_time.Wrap( -1 )
		gSizer2.Add( self.started_time, 0, wx.ALL, 5 )
		
		self.m_staticText8 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Finished :", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText8.Wrap( -1 )
		gSizer2.Add( self.m_staticText8, 0, wx.ALL, 5 )
		
		self.finished_time = wx.StaticText( self.m_panel1, wx.ID_ANY, u"NA", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.finished_time.Wrap( -1 )
		gSizer2.Add( self.finished_time, 0, wx.ALL, 5 )
		
		
		bSizer3.Add( gSizer2, 0, 0, 5 )
		
		
		bSizer2.Add( bSizer3, 0, wx.EXPAND, 5 )
		
		bSizer6 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.stop_btn = wx.Button( self.m_panel1, wx.ID_ANY, u"Stop", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer6.Add( self.stop_btn, 0, wx.ALL, 5 )
		
		self.close_btn = wx.Button( self.m_panel1, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.close_btn.SetDefault() 
		bSizer6.Add( self.close_btn, 0, wx.ALL, 5 )
		
		
		bSizer2.Add( bSizer6, 0, wx.ALIGN_RIGHT, 5 )
		
		
		self.m_panel1.SetSizer( bSizer2 )
		self.m_panel1.Layout()
		bSizer2.Fit( self.m_panel1 )
		bSizer1.Add( self.m_panel1, 1, wx.EXPAND |wx.ALL, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		self.rightclick_menu = wx.Menu()
		self.menu_files = wx.MenuItem( self.rightclick_menu, wx.ID_ANY, u"Go to files", wx.EmptyString, wx.ITEM_NORMAL )
		self.rightclick_menu.AppendItem( self.menu_files )
		
		self.menu_cancel_job = wx.MenuItem( self.rightclick_menu, wx.ID_ANY, u"Cancel job", wx.EmptyString, wx.ITEM_NORMAL )
		self.rightclick_menu.AppendItem( self.menu_cancel_job )
		
		self.Bind( wx.EVT_RIGHT_DOWN, self.Epistasis_monitor_frame_oldOnContextMenu ) 
		
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		self.job_list.Bind( wx.EVT_LEFT_DCLICK, self.OnDClick )
		self.job_list.Bind( wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClick )
		self.stop_btn.Bind( wx.EVT_BUTTON, self.OnStop )
		self.close_btn.Bind( wx.EVT_BUTTON, self.OnClose )
		self.Bind( wx.EVT_MENU, self.OnGotoFiles, id = self.menu_files.GetId() )
		self.Bind( wx.EVT_MENU, self.OnCancelJob, id = self.menu_cancel_job.GetId() )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def OnDClick( self, event ):
		event.Skip()
	
	def OnRightClick( self, event ):
		event.Skip()
	
	def OnStop( self, event ):
		event.Skip()
	
	def OnClose( self, event ):
		event.Skip()
	
	def OnGotoFiles( self, event ):
		event.Skip()
	
	def OnCancelJob( self, event ):
		event.Skip()
	
	def Epistasis_monitor_frame_oldOnContextMenu( self, event ):
		self.PopupMenu( self.rightclick_menu, event.GetPosition() )
		

